﻿//-----------------------------------------------------------------------
// <copyright file="FileVersionCheckResponse.cs" company="FastNET Services">
//     Copyright (c) 2008-2009. All Rights Reserved.
// </copyright>
// <license>
//     GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
//-----------------------------------------------------------------------
#region Usings

using System.Runtime.Serialization;

#endregion

namespace GateShift.Common.WcfDataContracts.Contracts
{
    /// <summary>
    /// DataContract sent as a response to requesting a torrent
    /// </summary>
    [DataContract]
    public struct FileVersionCheckResponse
    {
        /// <summary>
        /// Gets or sets the file the response is for
        /// </summary>
        [DataMember(Order = 1, Name = "responseFileName", IsRequired = true)]
        public string FileName { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether or not the file has been validated successfully
        /// </summary>
        [DataMember(Order = 2, Name = "responseIsValid", IsRequired = true)]
        public bool IsFileValid { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether or not the file can be removed (used for obsoletion)
        /// </summary>
        [DataMember(Order = 3, Name = "responseIsNeeded", IsRequired = false)]
        public bool IsFileNeeded { get; set; }

        /// <summary>
        /// Gets or sets the MapID for the response. Leaving this null specifies the core client
        /// </summary>
        [DataMember(Order = 4, Name = "requestedMapID", IsRequired = false)]
        public byte? MapID { get; set; }
    }
}